@extends('admin.admin.index')
@section('weizhi','修改秒杀')
@section('weizhi','秒杀修改')
@section('con')

<div class="col-md-6 col-md-offset-3">

	<form class="form-horizontal" role="form" action="{{url('admin/seckill/update')}}" method="post"  enctype="multipart/form-data">
	  <div class="form-group">
	    <label for="inputEmail3" class="col-sm-3 control-label">名称</label>
	    <div class="col-sm-9">
	      <input type="text" class="form-control" name="name" id="inputEmail3" value="{{$cates->name}}" placeholder="">
  	    	<span class="help-block"><span style="color:red;">*</span>&nbsp;&nbsp;限制15个文字以下</span>
	    </div>
	  </div>
	  <div class="form-group">
	    <label for="inputPassword3" class="col-sm-3 control-label">选择图片</label>
	    <div class="col-sm-9">
	      <input type="file" name="pic[]" id="input" multiple="multiple"/>
	    </div>
	  </div>
	  <div class="form-group">
	    <label for="inputEmail3" class="col-sm-3 control-label">活动时间</label>
	    <div class="col-sm-9">
			<div class="miaoshashijian" style="width:400px;margin-left:-95px">		
    	    <ul class="doc-set">
    	    <li>
    	        <div class="doc-dd">
    	            <input name="act_start_time" type="text" class="text-box" value="{{$cates->act_start_time}}" placeholder="开始时间" title="开始时间≥当前时间" readonly="readonly" style="cursor:pointer;"/>
    	            <input name="act_stop_time" type="text" class="text-box" value="{{$cates->act_stop_time}}" placeholder="结束时间" title="结束时间>开始时间" readonly="readonly" style="cursor:pointer;"/>
    	        </div>
    	    </li>			
    	</ul>
    	</div>
    	<script type="text/javascript">
    		$( "input[name='act_start_time'],input[name='act_stop_time']" ).datetimepicker();
    	</script>
	    </div>
	  </div>
		<input type="hidden" name="id" value="{{$cates->id}}">
	
	  {{csrf_field()}}
	  <div class="form-group">
	    <div class="col-sm-offset-3 col-sm-6">
	        <button type="submit" class="btn btn-default">确定修改</button>
	    </div>
	  </div>
	</form>
</div>
<script>  
   var inputElement = document.getElementById("input");    
	inputElement.addEventListener("change", handleFiles, false);  
  
	function handleFiles(){  
	    var fileList = this.files;  
	       var dd = document.getElementById('content');  
	    for( var i = 0 ; i < fileList.length ; i++ ){  
	           dd.innerHTML += fileList[i].name+"<br>";  
	    }  
	}  
   </script>
@endsection
